<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inheritance Example 2</title>
    <style>
        .parent {
            /* 设置父元素的字体族 */
            font-family: 'Arial', sans-serif;

        }

        /* 子元素没有指定字体族，所以会继承父元素的字体族 */
    </style>
</head>

<body>

    <p>Default font</p>
    <div class="parent">
        <p style="font-family: 'Courier New', Courier, monospace">This paragraph will be displayed in Arial font.</p>
        <span>This span will also be displayed in Arial font.</span>
    </div>

</body>

</html>